@extends('layouts.default')

@section('title', '教研活动-查看')

@push('scripts')
<script src="{{ asset('lib/xm-select-v1.2.4/xm-select.js')}}"></script>
<script>
    layui.use(['layer','form','table','laytpl','laydate','element','laypage','upload'], function(){
        var layer = layui.layer;
        var form = layui.form;
        var table = layui.table;
        var laytpl = layui.laytpl;
        var laydate = layui.laydate;
        var element = layui.element;
        var laypage = layui.laypage;
        var upload = layui.upload;
        var cxmDemo;
        var pxmDemo;
        var xmCourseDemo;
        var PageId = "{{request()->get('id',0)}}";
        var clFiles = [];
        var perPage = 10;
        var totalNum = 0;
        var LiveParam = {};
        var ScaleSelectData;
        var HomeworkFormData = [];
        var HomeworkDetails;
        var Video;
        commentsCount = 0;

        renderSelect();

        laydate.render({
            elem: '#begin-date'
            ,type: 'date'
        });
        laydate.render({
            elem: '#end-date'
            ,type: 'date'
        });
        //日期时间范围
        laydate.render({
            elem: '#live-date'
            ,type: 'datetime'
            ,range: true
        });

        //下拉框初始化
        async function renderSelect(){
            await toGetScaleSelect();
            // await renderDictionarySelect();
            await renderCoursesSelect();
            await renderDicSelect();
            await renderTermSelect();
            await renderCompere();
            await renderParticipants();
            pageInit();
        }

        // 量表选择框数据
        function toGetScaleSelect() {
            return new Promise((resolve) => {
                getScaleSelect({type: 3},function(res){
                    if(res.code == 1){
                        ScaleSelectData = res.data;
                        renderScaleSelect();

                        resolve();
                    }
                });
            });
        }
        //字典下拉框数据渲染
        function renderDictionarySelect() {
            return new Promise((resolve) => {
                getDictionaryItem({'diccode': ['SUBJECT']}, function (res){//, 'LEVEL'
                    if(res.code === 1) {
                        let data = res.data;

                        for(var k in data) {
                            let key = k.toLowerCase();
                            let d = data[k];

                            // $('[data-role='+key+'List]').empty().append('<option value="">请选择</option>');
                            for (var i in d) {
                                $('[data-role='+key+'List]').append('<option value="' + d[i].optionId + '">' + d[i].selectValue + '</option>');
                            }
                        }

                        form.render();

                        resolve();
                    }
                });
            });
        }
        //学科下拉框数据渲染
        function renderCoursesSelect() {
            return new Promise((resolve) => {
                getDictionaryXmSelect({'diccode': ['SUBJECT']},function(res){
                    if(res.code == 1){
                        xmCourseDemo = xmSelect.render({
                            el: '#courses',
                            autoRow: true,
                            filterable: true,
                            tree: {
                                show: true,
                                showFolderIcon: true,
                                showLine: true,
                                indent: 20,
                                expandedKeys:false
                            },
                            direction: 'down',
                            height: '480px',
                            name:'course_item',
                            layVerify: 'required',
                            layVerType: 'msg',
                            layReqText:'年级不能为空',
                            theme: {
                                color: '#2d8cf0',
                            },
                            model: {
                                label: {
                                    type: 'block',
                                    block: {
                                        //最大显示数量, 0:不限制
                                        showCount: 0,
                                        //是否显示删除图标
                                        showIcon: false,
                                    }
                                }
                            },
                            disabled:true,
                            searchTips:'关键字搜索',
                            data: function(){
                                return res.data.SUBJECT
                            }
                        })

                        return resolve();
                    }
                });
            });
        }

        //字典下拉框数据渲染
        function renderDicSelect() {
            return new Promise((resolve) => {
                getDicListByCodes({'diccode': ['HDLB']}, function (res){
                    if(res.code === 1) {
                        let data = res.data;

                        for(var k in data) {
                            // $('[data-role='+k+'List]').empty().append('<option value="">请选择</option>');
                            let d = data[k];
                            for (var i in d) {
                                $('[data-role='+k+'List]').append('<option value="' + d[i].itemcode + '">' + d[i].itemname + '</option>');
                            }
                        }

                        form.render();

                        resolve();
                    }
                });
            });
        }

        //学期下拉框数据渲染
        function renderTermSelect() {
            return new Promise((resolve) => {
                getTermData({},function(res){
                    if(res.code == 1){
                        // $('[data-role=termList]').empty().append('<option value="">请选择</option>');
                        for(var i in res.data){
                            $('[data-role=termList]').append('<option value="'+res.data[i].id+'">'+res.data[i].title+'</option>');
                        }

                        form.render('select');

                        resolve();
                    }
                });
            });
        }

        //主讲教师下拉框数据渲染
        function renderCompere() {
            return new Promise((resolve) => {
                getParticipantsData({},function(res){
                    if(res.code == 1){
                        cxmDemo = xmSelect.render({
                            el: '#cter',
                            autoRow: true,
                            filterable: true,
                            tree: {
                                show: true,
                                showFolderIcon: true,
                                showLine: true,
                                indent: 20,
                                expandedKeys:false
                            },
                            direction: 'down',
                            filterable: true,
                            height: 'auto',
                            name:'compere',
                            layVerify: 'required',
                            layVerType: 'msg',
                            layReqText:'主讲教师不能为空',
                            theme: {
                                color: '#2d8cf0',
                            },
                            model: {
                                label: {
                                    type: 'block',
                                    block: {
                                        //最大显示数量, 0:不限制
                                        showCount: 0,
                                        //是否显示删除图标
                                        showIcon: false,
                                    }
                                }
                            },
                            disabled:true,
                            searchTips:'关键字搜索',
                            data: function(){
                                return res.data
                            }
                        })

                        return resolve();
                    }
                });
            });
        }
        //参与教师下拉框数据渲染
        function renderParticipants() {
            return new Promise((resolve) => {
                getParticipantsData({},function(res){
                    if(res.code == 1){
                        pxmDemo = xmSelect.render({
                            el: '#pter',
                            autoRow: true,
                            filterable: true,
                            tree: {
                                show: true,
                                showFolderIcon: true,
                                showLine: true,
                                indent: 20,
                                expandedKeys:false
                            },
                            direction: 'down',
                            filterable: true,
                            height: 'auto',
                            name:'participant',
                            layVerify: 'required',
                            layVerType: 'msg',
                            layReqText:'参与教师不能为空',
                            theme: {
                                color: '#2d8cf0',
                            },
                            model: {
                                label: {
                                    type: 'block',
                                    block: {
                                        //最大显示数量, 0:不限制
                                        showCount: 0,
                                        //是否显示删除图标
                                        showIcon: false,
                                    }
                                }
                            },
                            disabled:true,
                            searchTips:'关键字搜索',
                            data: function(){
                                return res.data
                            }
                        })

                        return resolve();
                    }
                });
            });
        }

        // 文件显示
        function fileShow(files) {
            let showFiles = {};
            layui.each(files, function(i, d) {
                if(d.field) {
                    clFiles.push(d.file_origin);

                    if (showFiles[d.field]) {
                        showFiles[d.field].push(d);
                    } else {
                        showFiles[d.field] = [d];
                    }
                } else {
                    if (showFiles['cl']) {
                        showFiles['cl'].push(d);
                    } else {
                        showFiles['cl'] = [d];
                    }
                }
            });

            layui.each(showFiles, function(f, d) {
                let fileShowTpl = fileShowDemo.innerHTML
                    ,fileShow = document.getElementById('file-show-'+f);

                laytpl(fileShowTpl).render(d, function(html){
                    fileShow.innerHTML = html;
                });
            });
        }
        //数据渲染
        function pageInit(){
            getTeaActivityOne({id:PageId}, function(res) {
                if(res.code === 1) {
                    let Activity = res.data;
                    let TeachingActivity = Activity.teaching_activity;
                    let oldLevel = Activity.level && Activity.level_array.length > 0 ? Activity.level_array[0].selectValue : '校级';

                    form.val('infoForm', {
                        'id': PageId,
                        'data_version_id': Activity.data_version_id,
                        'name': Activity.name,
                        'begin_date': Activity.begin_date,
                        'end_date': Activity.end_date,
                        'activity_level': TeachingActivity.activity_level ? TeachingActivity.activity_level : oldLevel,
                        // 'course': Activity.course_set[0].optionId,
                        'teaching_type': TeachingActivity.teaching_type,
                        'activity_type': TeachingActivity.activity_type,
                        // 'video_link': TeachingActivity.video_link,
                        'is_open': TeachingActivity.is_open,
                        'place': TeachingActivity.place,
                        'content': TeachingActivity.content
                    });

                    if(Activity.course && Activity.course_set.length > 0) {
                        let courseSelected = [];
                        layui.each(Activity.course_set, function(i, d) {
                            courseSelected.push(d.optionId);
                        });
                        xmCourseDemo.setValue(courseSelected);
                    }

                    if(TeachingActivity.video_link) {
                        $("#video-link").attr('href', TeachingActivity.video_link).html(TeachingActivity.video_link);
                    }

                    if(TeachingActivity.is_sign == 1) {
                        $("#sign-in").removeClass("layui-hide");
                    }

                    //参与教师
                    cxmDemo.setValue(Activity.participants_users.pere);
                    pxmDemo.setValue(Activity.participants_users.pant);
                    //直播
                    if(TeachingActivity.live_id) {
                        let lHtml = '<span style="line-height: 42px;display: inline-block;max-width: 90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">'+TeachingActivity.live.name+'</span>'
                        $("#live-show").append(lHtml);
                        $("#comment-activity-id").val(PageId);

                        //视频文件渲染
                        //todo
                        controlVideo();
                    }

                    //文件
                    if(Activity.proof_material_array.length){
                        fileShow(Activity.proof_material_array);
                    }

                    // 评论
                    if(Activity.comments) {
                        let cmtShowTpl = commentShowDemo.innerHTML
                            ,cmtShow = document.getElementById('comment-items');

                        laytpl(cmtShowTpl).render(Activity.comments, function(html){
                            cmtShow.innerHTML = html;
                        });
                    }
                    commentsCount = Activity.comments_count;
                    $('#comment-number').html(commentsCount)
                    form.render();
                } else {
                    layer.msg('无数据记录', {time: 2000, icon: 5});
                }
            });
        }

        //视频处理
        function controlVideo() {
            //获取视频DOM元素
            var myVideo = document.getElementById("play-video-id");

            myVideo.oncanplay = function(){
                // console.log("准备就绪");
            };

            //监听播放开始
            myVideo.addEventListener('play',function(){
                // console.log("开始播放");
            });

            //监听播放结束
            myVideo.addEventListener('pause',function(){
                // console.log("播放暂停");
            });

            //监听播放结束
            myVideo.addEventListener('ended',function(){
                // console.log("播放结束");
                $("#show-play-time").html("00:00");
            });

            //使用事件监听方式捕捉事件， 此事件可作为实时监测video 播放状态
            myVideo.addEventListener("timeupdate",function(){
                var timeDisplay;

                //用秒数来显示当前播放进度
                // timeDisplay = Math.floor(myVideo.currentTime);
                // console.log(Math.floor(myVideo.currentTime));
                timeDisplay = Math.floor(myVideo.currentTime);

                var tempDate = new Date(timeDisplay*1000);
                var currentPlayTime = tempDate.format("mm:ss");
                $("#show-play-time").html(currentPlayTime);
            },false);
        }

        $("#comment-btn").on('click', function() {
            var subData = {};
            var isValid = form.validate('#comment-text');
            if(!isValid) return false;

            subData.activity_id = $("#comment-activity-id").val();
            subData.comment_time = $("#show-play-time").html();
            subData.comment = $("#comment-text").val();

            addComment(subData, function(res){
                if(res.code == '1'){
                    let cmtShowTpl = commentShowDemo.innerHTML
                        ,cmtShow = document.getElementById('comment-items');

                    laytpl(cmtShowTpl).render(res.data, function(html){
                        cmtShow.innerHTML = html;
                    });
                    commentsCount = commentsCount + 1;
                    $('#comment-number').html(commentsCount)
                    layer.msg(res.msg,{icon: 6,time: 1000});
                }else{
                    layer.msg(res.msg, {icon: 5,shift : 6});
                }
            });
        });

        function renderScaleSelect(){
            // $('[data-role=scaleList]').empty().append('<option value="">请选择</option>');
            for(var i in ScaleSelectData){
                $('[data-role=scaleList]').append('<option value="'+ScaleSelectData[i].id+'">'+ScaleSelectData[i].name+'</option>');
            }

            form.render('select');
        }

        //获取签到二维码
        $('#sign-in').on('click', function(){
            layer.open({
                type: 1
                ,title:'签到二维码'
                ,content: $('#view-qr-code')
                ,area: ['500px', '450px']
                ,success: function(layero, index){
                    getQRCode({'id': PageId},function(res){
                        if(res.code == 1){
                            var qrCodeTpl = qrCodeView.innerHTML
                                ,viewQRCode = document.getElementById('view-qr-code');

                            laytpl(qrCodeTpl).render(res.data, function(html){
                                viewQRCode.innerHTML = html;
                            });
                        }
                    })
                }
            });
        });

        $(".cancel-btn").click(function(){
            layer.closeAll();
        });
    });

    $(document).on('click','#copy',function(){
        copyText($(document).find('#qrcode-url').attr('value'));
    })
</script>
@endpush

@section('content')
<style>
    .opt-panel{padding: 10px;}
    .panel-title h3{margin-bottom: 20px;font-weight: 800;}

    .opt-form{padding: 20px 5px 0;}
    .opt-area{display: flex;flex-direction: row-reverse;padding: 10px 20px;margin-bottom: 20px;}
    .opt-area button, .back-btn{margin-left: 10px;}
    .opt-form .layui-row{margin-bottom: 20px;}
    /* 设置表单元素无border */
    #base-info .layuik-form-item{margin-bottom: 0;}
    #base-info input,#base-info textarea,#base-info xm-select,.no-border-inline input{border: none;}
    #base-info .layui-edge,#base-info .xm-icon{display: none;}
    #base-info textarea{min-height: 60px;padding-top: 10px;}

    .resourse-row{min-height: 200px;}
    .materail-item{margin: 0;}
    .resourse-show{display: grid;}
    .video-content{max-height: 360px;padding: 5px 24px;}
    #file-show-cl{max-height: 100px;overflow-y: auto;}
    #file-show-cl li{display: inline-block;}

    .resource-item{position: relative;}
    .dashed-line {
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background-image: linear-gradient(to bottom, #d7d7d7 0%, #d7d7d7 80%, transparent 50%);
        background-size: 100% 12px;
        background-repeat: repeat-y
    }
    .resource-comment{display: grid;grid-template-rows: 30% 70%;min-height: 480px;padding: 5px 10px;}
    .resource-comment .layui-textarea{min-height: 80px;margin: 5px 0;}
    .resource-comment #comment-btn{float: right;}
    .comment-show h3{display: inline;}
    .total-tip{color: #7f7f7f;}
    .comment-items{max-height: 300px;overflow-y: auto;}
    .comment-item{min-height: 28px;margin-bottom: 10px;padding: 5px;border-bottom: 5px solid #f2f2f2;}
    .item-menu{display: grid;grid-template-columns: 12% 68% 20%;margin-bottom: 5px;}
    .comment-date{color: #aaaaaa;}
    .comment-time{color: #f59a86;text-align: right;}

    .homework-row{min-height: 300px;padding: 0 5px 20px;}
    #video-link{display: inline-block;line-height: 42px;}
</style>

<div class="layui-row">
    <div class="layui-panel opt-panel">
        <form class="layui-form opt-form" action="" id="info-form" lay-filter="infoForm">
            <div class="layui-row" id="base-info">
                <div class="panel-title">
                    <h3>教研活动 - 基本设置</h3>
                </div>
                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">学年学期：</label>
                        <div class="layuik-input-inline">
                            <select disabled class="data-version-id" name="data_version_id" lay-filter="termList" data-role="termList" lay-verify="required" lay-reqText="不能为空"></select>
                        </div>
                    </div>
                    <div class="layuik-inline">
                        <label class="layuik-form-label">教研名称：</label>
                        <div class="layuik-input-inline">
                            <input disabled type="text" name="name" required lay-verify="required" lay-reqText="不能为空" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">教研形式：</label>
                        <div class="layuik-input-inline">
                            <input type="radio" name="teaching_type" title="在线" value="1" class="layui-radio">
                            <input type="radio" name="teaching_type" title="离线" value="2" class="layui-radio">
                            <button id="sign-in" class="pear-btn pear-btn-primary layui-hide" type="button">签到二维码</button>
                        </div>
                    </div>
                    <div class="layuik-inline">
                        <label class="layuik-form-label">活动类别：</label>
                        <div class="layuik-input-inline">
                            <select disabled name="activity_type" lay-filter="hdlbList" data-role="hdlbList" lay-verify="required" lay-reqText="不能为空"></select>
                        </div>
                    </div>
                </div>
                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">学科：</label>
                        <div class="layuik-input-inline">
                            <div type="text" id="courses" class="xm-select-courses"></div>
                            <!-- <select disabled name="course" lay-filter="subjectList" data-role="subjectList" lay-verify="required" lay-reqText="不能为空"></select> -->
                        </div>
                    </div>
                    <div class="layuik-inline">
                        <label class="layuik-form-label">级别：</label>
                        <div class="layuik-input-inline">
                            <input type="text" name="activity_level" required lay-verify="required" placeholder="请输入" lay-reqText="不能为空" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">公开课：</label>
                        <div class="layuik-input-inline">
                            <input type="radio" name="is_open" title="是" value="1" lay-verify="otherReq" class="layui-radio">
                            <input type="radio" name="is_open" title="否" value="2" lay-verify="otherReq" class="layui-radio">
                        </div>
                    </div>
                    <div class="layuik-inline">
                        <label class="layuik-form-label">地址：</label>
                        <div class="layuik-input-inline">
                            <input disabled type="text" name="place" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">开始日期：</label>
                        <div class="layuik-input-inline">
                            <input disabled type="text" name="begin_date" id="begin-date" required lay-verify="required" lay-reqText="不能为空" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layuik-inline">
                        <label class="layuik-form-label">结束日期：</label>
                        <div class="layuik-input-inline">
                            <input disabled type="text" name="end_date" id="end-date" required lay-verify="required" lay-reqText="不能为空" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layuik-form-item">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">教研内容：</label>
                        <div class="layuik-input-inline">
                            <textarea name="content" id="" rows="2" class="layui-textarea"></textarea>
                        </div>
                    </div>
                </div>
                <div class="layuik-form-item">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">主讲教师：</label>
                        <div class="layuik-input-inline">
                            <div type="text" id="cter" class="xm-select-demo"></div>
                        </div>
                    </div>
                </div>
                <div class="layuik-form-item">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">参与教师：</label>
                        <div class="layuik-input-inline">
                            <div type="text" id="pter" class="xm-select-demo"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-row resourse-row">
                <div class="panel-title">
                    <h3>教研活动 - 教研资源</h3>
                </div>
                <div class="resourse-show">
                    <div class="resource-item">
                        <div class="layuik-form-item materail-item layuik-columns-two">
                            <div class="layuik-inline">
                                <label class="layuik-form-label">参考材料：</label>
                                <div class="layuik-input-inline">
                                    <div style="float: left;margin: 13px 5px;"><img src="/static/image/link.svg" width="19" height="19"/></div><span id="file-show-cl"></span>
                                </div>
                            </div>
                            <div class="layuik-inline">
                                <label class="layuik-form-label">视频链接：</label>
                                <div class="layuik-input-inline no-border-inline">
                                    <!-- <input type="text" name="video_link" autocomplete="off" class="layui-input"> -->
                                    <a href="javascript:;" target="_blank" id="video-link"></a>
                                </div>
                            </div>
                        </div>

                        <div class="layuik-form-item">
                            <div class="layuik-inline">
                                <label class="layuik-form-label"></label>
                                <!-- <label class="layuik-form-label">直播资源：</label> -->
                                <div class="layuik-input-inline">
                                    <div id="live-show"></div>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="layuik-form-item">
                            <div class="video-content">
                                <video id="play-video-id" width="100%" height="100%" controls="true">
                                    您的浏览器不支持 HTML5 video 标签。
                                </video>
                            </div>
                        </div> -->
                        <!-- <source src="{{ URL::asset('app/images/v1.mp4') }}" type="video/mp4"> -->
                        <div class="leave-comment layuik-form-item">
                            <div class="panel-title">
                                <h3>教研活动 - 评论</h3>
                            </div>
                            <div class="layui-card-body">
                                <textarea name="comment_content" id="comment-text" rows="2" class="layui-textarea comment-area" lay-verify="required" lay-reqText="不能为空"></textarea>
                                <button class="layui-btn layui-btn-normal" type="button" id="comment-btn" style="float: right;margin-top: 15px"> 发表评论</button>
                                <input type="hidden" name="comment_activity_id" id="comment-activity-id">
                            </div>
                        </div>
                        <div class="comment-show layuik-form-item">
                            <div class="layui-card">
                                <div class="layui-card-header">
                                    <h3>评论记录</h3>
                                    <span class="total-tip" style="font-size: 15px"> (共&nbsp;&nbsp;<span id="comment-number">2</span>&nbsp;条留言)</span>
                                </div>
                                <div class="layui-card-body comment-items layuik-columns-two" id="comment-items"></div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </form>

        <div class="layui-row homework-row">
            <div class="panel-title">
                <h3>教研活动 - 作业</h3>
            </div>
            <div class="homework-show">
                @include('teaching.activity.details', ['is_view' => true])
            </div>
        </div>

        <div class="layui-row">
            <div class="opt-area">
                <a href="javascript:history.go(-1);" class="layui-btn layui-btn-primary back-btn">返回</a>
            </div>
        </div>
    </div>
</div>

<!---二维码渲染-->
<div id="view-qr-code" style="display:none"></div>
<script type="text/html" id="qrCodeView">
    <div>
        <img style="margin-left: 110px;" src="@{{d.qrcode}}" >
    </div>
    <div >
        <div class="layui-inline" style="width: 80%;margin-left: 60px;margin-top: 20px">
            <div class="layui-input-inline" style="width:65%" >
                <input type="text" id="qrcode-url" value="@{{d.url}}" placeholder="请输入外部链接地址" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-input-inline" style="width:30%" >
                <button id="copy" class="pear-btn pear-btn-primary" type="button" >复制链接</button>
            </div>
        </div>
    </div>
</script>

<script id="commentShowDemo" type="text/html">
@{{#  layui.each(d, function(index, item){ }}
@{{#  if(item){ }}
    <div class="comment-item layui-col-md6">
        <div class="item-menu">
            <span class="comment-user">@{{item.user_name}}</span>
            <span class="comment-date">@{{item.comment_date}}</span>
            <span class="comment-time">@{{item.comment_time}}</span>
        </div>
        <div class="comment-content">@{{item.comment}}</div>
    </div>
@{{#  } }}
@{{#  }); }}
</script>

<script id="fileShowDemo" type="text/html">
<ul>
@{{#  layui.each(d, function(index, item){ }}
@{{#  if(item){ }}
    <li style="min-width: 200px;max-width: 400px;margin: 13px 5px;">
        <a style="color: #0e90d2;" target="_blank" title="@{{item.file_info.file_name}}" href="@{{item.file_info.file_dir}}@{{item.file_info.file_path}}">
            <span style="display: inline-block;max-width: 90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">@{{item.file_info.file_name}}</span>
        </a>
        <a style="color:#74B8FF" href="@{{item.file_info.file_dir}}@{{item.file_info.file_path}}" download="@{{item.file_info.file_name}}">
            <span class="icon pear-icon pear-icon-download" style="color:#74B8FF;margin-left:10px;"></span>
        </a>
    </li>
@{{#  } }}
@{{#  }); }}
</ul>
</script>
@endsection
